﻿namespace Digitalmes.Core.Domain.Eitites;

/// <summary>
/// 转台数据记录表
/// </summary>
[SugarTable("turntable_archive_record")]
public sealed class TurntableArchiveRecord : EntityBase
{
    /// <summary>
    /// 记录时间
    /// </summary>
    [DisplayName("记录时间")]
    public DateTime ArchiveTime { get; set; }

    /// <summary>
    /// 正转时间(s)
    /// </summary>
    [DisplayName("正转时间(s)")]
    public double ForwardRotationTime { get; set; }

    /// <summary>
    /// 反转时间(s)
    /// </summary>
    [DisplayName("反转时间(s)")]
    public double ReverseRotationTime { get; set; }

    /// <summary>
    /// 重复定位精度-A
    /// </summary>
    [DisplayName("重复定位精度0°(mm)")]
    public double Repeatability1 { get; set; }

    /// <summary>
    /// 重复定位精度-B
    /// </summary>
    [DisplayName("重复定位精度180°(mm)")]
    public double Repeatability2 { get; set; }

    /// <summary>
    /// 轴向重复定位精度
    /// </summary>
    [DisplayName("轴向重复定位精度")]
    public double RepeatabilityAxial1 { get; set; }

    /// <summary>
    /// 轴向重复定位精度（偏载）
    /// </summary>
    [DisplayName("轴向重复定位精度（偏载）")]
    public double RepeatabilityAxial2 { get; set; }

    /// <summary>
    /// 转动次数
    /// </summary>
    [DisplayName("转动次数")]
    public int Number { get; set; }

    /// <summary>
    /// 转向
    /// </summary>
    [DisplayName("转向")]
    public Rotation Rotation { get; set; }
}

/// <summary>
/// 转向
/// </summary>
[Description("转向")]
public enum Rotation
{
    /// <summary>
    /// 未知
    /// </summary>
    [Description("未知")]
    Unkown = 0,

    /// <summary>
    /// 正转
    /// </summary>
    [Description("正转")]
    Forward = 1,

    /// <summary>
    /// 反转
    /// </summary>
    [Description("反转")]
    Reverse = 2,
}
